package cn.com.css.taxInspection.gt3.mapper;

import cn.com.css.taxInspection.gt3.entity.ZxhjQqtjEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ZxhjQqtjMapper extends BaseMapper<ZxhjQqtjEntity> {
    /**
     * 查询指定月份的数据
     *
     * @param yf 月份格式 yyyyMM
     * @return 包含 hs, cbfkje, sjfkje, qjfkje 的 Map
     */
    ZxhjQqtjEntity findByYf(@Param("yf") String yf);

    ZxhjQqtjEntity findByYfAndSwjgmc(@Param("yf") String yf,@Param("swjgmc") String swjgmc);

    ZxhjQqtjEntity findByYfAndSwjg(@Param("yf") String yf,@Param("swjgmc") String swjgmc);

    /**
     * 查询年度汇总数据
     *
     * @param year 年份 yyyy
     * @return 包含 hs, cbfkje, sjfkje, qjfkje 汇总的 Map
     */
    ZxhjQqtjEntity sumByYear(@Param("year") int year);
    ZxhjQqtjEntity sumByYearBySwjg(@Param("yf") String yf,@Param("year") int year,@Param("swjgmc") String swjgmc);

    /**
     * 删除
     */
    void delByUuid(@Param("uuid") String uuid);

    ZxhjQqtjEntity sumLastMt(@Param("yf") String yf,@Param("swjgmc") String swjgmc);
}
